Skip to content

Fixed unreachable nickNoMore Message in /nick command. Not a huge change. #6442

Merged
mdcfe merged 1 commit intoEssentialsX:2.xfrom
Lab18bke:commandnick-small-fix
Feb 21, 2026
Merged

Fixed unreachable nickNoMore Message in /nick command. Not a huge change. #6442
mdcfe merged 1 commit intoEssentialsX:2.xfrom
Lab18bke:commandnick-small-fix

Conversation

@Lab18bke
Copy link
Contributor

The display name was comparing getDisplayName() to itself, making it always true which made the nickNoMore message unreachable. Now it uses FormatUtil.stripFormat() to strip color codes before comparing against getName(), also has a null-safety guard.

I have built it locally and tested it - it works well. Verified: "Nick set normally", "Nick equal to Username", "Colored nick equal to Username". Had no Errors.

…nge. The display name was comparing getDisplayName() to itself, making it always true which made the nickNoMore message unreachable. Now it uses FormatUtil.stripFormat() to strip color codes before comparing against getName(), also has a null-safety guard.
Copilot AI review requested due to automatic review settings February 21, 2026 06:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the /nick command where the nickNoMore message was unreachable due to a logical error. The code was comparing getDisplayName() to itself instead of comparing the stripped display name to the actual player name. The fix properly strips color codes from the display name before comparing it to the player's real name, and adds appropriate null safety.

Changes:

  • Fixed unreachable nickNoMore message in the /nick command by correcting the comparison logic
  • Added proper null safety guard when checking if a nick equals the username

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mdcfe mdcfe enabled auto-merge February 21, 2026 08:43
@mdcfe mdcfe added this pull request to the merge queue Feb 21, 2026
Merged via the queue into EssentialsX:2.x with commit d16aec1 Feb 21, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants